import http from './http'

export async function uploadFile(file: File) {
  const form = new FormData()
  form.append('file', file)
  const resp = await http.post('/upload', form, { headers: { 'Content-Type': 'multipart/form-data' } })
  return (resp.data as any).data as { url: string; key: string }
}


